<?php 

namespace Common\Common;

/**
* 分类树类
*/
class Tree  
{
	public $temp =array();
	public  function reload($data,$fid=0,$cn='')
	{
		foreach ($data as $value) {
			if($value['fid']==$fid){
				$str = "┠".$cn;
				$value['cname'] = $str.$value['cname'];
				$this->temp[]=$value;
				$this->reload($data,$value['id'],$cn."---");
			}
		}

		return $this->temp;
	}
}














 ?>